Methods and systems for orienting a mobile device to a vehicle&#39;s reference frame

ABSTRACT

A method of providing a quaternion for reference frame transformation includes (a) initiating a driving event in a vehicle having a vehicle reference frame and (b) receiving, from a mobile device, mobile device data associated with a time stamp. The method also includes (c) computing a quaternion operable to transform the mobile device data to the vehicle reference frame and (d) determining if the driving event is complete. The method further includes incrementing the time stamp and iterating steps (a), (b), (c), and (d) if the driving event is not complete and providing the quaternion for reference frame transformation if the driving event is complete.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a divisional application of U.S. patent applicationSer. No. 15/486,053, filed on Apr. 12, 2017; which claims priority toU.S. Provisional Patent Application No. 62/324,168, filed on Apr. 18,2016, the disclosures of which are hereby incorporated by reference intheir entirety for all purposes.

BACKGROUND OF THE INVENTION

For insurance and other purposes, driving behavior has been a topic ofinterest. Some systems have been developed to track driving behaviorsincluding speed, braking, and turn speed. External devices have beenintegrated with vehicles to track driving behavior.

Despite the progress made in relation to collecting data related todrivers and their driving behavior, there is a need in the art forimproved methods and systems related to collecting accurate data fortracking and evaluating driving behavior.

SUMMARY OF THE INVENTION

The present invention relates generally to methods and systems fordetermining a user's driving behavior during driving events. Moreparticularly, embodiments of the present invention provide methods andsystems for using a mobile device to provide information related to adriver's behavior. In some embodiments, methods and systems are providedthat enable a mobile device to be oriented related to a reference frameof a vehicle. The present invention is not limited to this particularprocess, but is applicable to a range of applications.

According to an embodiment of the present invention, a method oforienting a mobile device to a vehicle is provided. The method includesdetermining an orientation of a gravity vector and aligning a first axisof the mobile device with respect to the gravity vector. The method alsoincludes determining an orientation of a magnetic direction and aligninga second axis of the mobile device with respect to the magneticdirection. The method further includes determining a direction of travelfor the vehicle and orienting the mobile device to the vehicle.

According to a particular embodiment of the present invention, a methodof providing a quaternion for reference frame transformation isprovided. The method includes (a) initiating a driving event in avehicle having a reference frame and (b) receiving mobile device dataassociated with a time stamp. The method also includes (c) computing aquaternion operable to transform the mobile device data to the vehiclereference frame and (d) determining if the driving event is complete. Ifthe driving event is not complete, the method includes incrementing thetime stamp and iterating steps (a), (b), (c), and (d). If the drivingevent is complete, the method includes providing the quaternion forreference frame transformation.

According to another embodiment of the present invention, a method ofidentifying use of a mobile device by a driver of a vehicle during adriving event is provided. The method includes obtaining motion datafrom the mobile device during the driving event and orienting theobtained motion data to a reference frame of the vehicle. The methodalso includes determining that the mobile device has moved to the leftwith respect to the vehicle and determining that a front screen of themobile device faces to the left with respect to the vehicle. The methodfurther includes identifying use of the mobile device by the driverduring the driving event.

According to an alternative embodiment of the present invention, amethod of identifying a driver of a vehicle having a vehicle referenceframe is provided. The method includes obtaining mobile device motiondata in a mobile device reference frame during a driving event anddetermining that the vehicle has stopped at completion of the drivingevent. The method also includes obtaining additional mobile devicemotion data after completion of the driving event and aligning themobile device motion data and the additional mobile device motion datato the vehicle reference frame. The method further includes determiningthat a trajectory of the additional mobile device motion data correlateswith a direction aligned with a driver side of the vehicle referenceframe and identifying the driver of the vehicle based on the trajectory.

According to another alternative embodiment of the present invention, amethod of performing exit detection is provided. The method includesreceiving motion data from the mobile device, measured in the mobiledevice reference frame. The method also includes transforming the motiondata to the vehicle reference frame and determining that the mobiledevice is stationary with respect to the vehicle reference frame duringa first time period. The method further includes determining that themobile device is moved with respect to the vehicle reference frameduring a second time period. If the movement during the second timeperiod was directed to the left, which indicates that the driver hasmoved the mobile device, then a determination is made that the driver ofthe vehicle has exited the vehicle. If the movement during the secondtime period was directed to the right, which indicates that thepassenger has moved the mobile device, then a determination is made thatthe passenger of the vehicle has exited the vehicle.

Numerous benefits are achieved by way of the present invention overconventional techniques. For example, embodiments of the presentinvention utilize a mobile device's sensors, including a combination ofthe magnetometer, the GPS course, and gravity measurements to define(e.g., completely define) the mobile device's orientation with respectto the reference frame of a moving vehicle. These and other embodimentsof the invention along with many of its advantages and features aredescribed in more detail in conjunction with the text below and attachedfigures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified schematic diagram illustrating a reference framefor a vehicle according to an embodiment of the present invention.

FIG. 2 is a simplified schematic diagram illustrating a reference framefor a mobile device according to an embodiment of the present invention.

FIG. 3 is a simplified flowchart illustrating a method of orienting amobile device in the reference frame of a vehicle according to anembodiment of the present invention.

FIG. 4A is a flow diagram illustrating the method described in relationto FIG. 3.

FIG. 4B illustrates an axis of a global gravity reference frame.

FIG. 4C illustrates axes of a global gravity/magnetic reference frame.

FIG. 4D illustrates an axis of a vehicle reference frame.

FIG. 5 is a simplified flowchart illustrating a method of transformingmobile device data into vehicle-based data according to an embodiment ofthe present invention.

FIG. 6 is a simplified flowchart illustrating a method of identifyinguse of a mobile device by a driver during a driving event according toan embodiment of the present invention.

FIG. 7 is a simplified plot illustrating quaternions computed during adriving event according to an embodiment of the present invention.

FIG. 8 is a simplified flowchart illustrating a method of identifying adriver of a vehicle having a vehicle reference frame according to anembodiment of the present invention.

FIG. 9 is a simplified flowchart illustrating a method of performingexit detection according to an embodiment of the present invention.

DETAILED DESCRIPTION OF SPECIFIC EMBODIMENTS

Embodiments of the present invention relate generally to methods andsystems for determining a user's driving behavior during driving events.More particularly, embodiments of the present invention provide methodsand systems for using a mobile device to provide information related toa driver's behavior. In some embodiments, methods and systems areprovided that enable a mobile device to be oriented related to areference frame of a vehicle. The present invention is not limited tothis particular process, but is applicable to a range of applications.

Embodiments of the present invention provide a transformation from amobile device reference frame to a vehicle reference frame that isoperable when the mobile device is moving with respect to the vehicle.Thus, embodiments overcome limitations in conventional systems in whichthis transformation was only available when either the mobile device wasin a fixed relationship to the vehicle or was only available duringperiods of time during which it was known that the mobile device was notmoving with respect to the vehicle. Using embodiments of the presentinvention, motion of the mobile device with respect to the vehicle canbe used to identify distracted driving situations and behaviors notpossible using conventional techniques. Embodiments of the presentinvention are applicable to a wide variety of applications that utilizeinformation on the orientation of the mobile device with respect to thereference frame of the vehicle.

According to another embodiment of the present invention, systems andmethods to detect exit based on motion of the mobile device (e.g., aphone) in directions that are up and to the left (for a driver) ormotion up and to the right (for a passenger) are provided. When a userexits the vehicle, if the mobile device is in their pants pocket, it ispossible to detect a rotation around the x-axis of the vehicle,corresponding to the person lifting their foot to step out of thevehicle. This action would then be followed by (or occur simultaneouslywith) either a positive or negative rotation of the mobile device aroundthe y-axis of the vehicle, depending on whether the person exited on theleft or right side of the vehicle. Given the orientation of the mobiledevice with respect to the vehicle, detection of this sequence ofactions is possible and can be utilized to determine if the personexiting the vehicle is a driver or a passenger.

According to a particular embodiment of the present invention, methodsand systems for determining that the mobile device is in a directionthat faces the driver are provided. This embodiment can be applicable todetecting a phone call, texting, or the like by the driver. The user inthe vehicle could be using a mobile device for texting or talking. Oncea change in angular position of the mobile device is detected, themobile device's orientation with respect to the vehicle's referenceframe can be determined. For example, if the user is texting, the mobiledevice's screen would be facing the user and this can be easily detectedsince the vehicle's reference frame is known.

In another example, a user making a phone call on a mobile phone mayhold the phone up to their ear. In this case, the phone' orientationwith respect to the vehicle would show the phone facing the side of thevehicle associated with the user (i.e., the side of the user's face).

Another example of a condition in which the alignment of the mobiledevice's reference frame to that of the vehicle can be applied is brakematching. Once the vehicle's reference frame is determined, theaccelerometer signals measured in the mobile device's reference framecan be transformed into the vehicle's reference frame and accelerationin the negative z-direction would be determined as the acceleration ofthe vehicle. Given this referenced data, it is possible to detect hardbrakes, harsh accelerations, and the like.

FIG. 1 is a simplified schematic diagram illustrating a reference framefor a vehicle according to an embodiment of the present invention. Thereference frame of the vehicle, also referred to as the vehiclereference frame, is defined such that the horizontal plane of thevehicle is parallel to the plane including the wheels and includes thex-axis and the z-axis. The y-axis is aligned vertically with respect tothe horizontal plane of the vehicle and points opposite to a gravityvector when the vehicle is on a level surface. The direction of forwardtravel of the vehicle is aligned along the negative z-axis and thepositive x-axis is aligned along the direction from the driver's side tothe passenger's side.

FIG. 2 is a simplified schematic diagram illustrating a reference framefor a mobile device according to an embodiment of the present invention.As illustrated in FIG. 2, the mobile device 210, which may be a smartphone, a tablet, or other portable electronic device, has a referenceframe defined by axes x, y, and z. The acceleration due to gravity isrepresented by vector 215, which can also be referred to as gravityvector g=(g_(x), g_(y), g_(z)), which is in the mobile device'sreference frame. The gravity vector norm (also in the mobile device'sreference frame) is g_(norm)=g/|g|.

Additional description related to the gravity vector is provided in U.S.patent application Ser. No. 15/149,603, filed on May 9, 2016 andpublished as U.S. Patent Application Publication No. 2016/0325756, thedisclosure of which is hereby incorporated by reference in its entiretyfor all purposes.

FIG. 3 is a simplified flowchart illustrating a method of orienting amobile device in the reference frame of a vehicle according to anembodiment of the present invention. FIG. 4A is a flow diagramillustrating the method described in relation to FIG. 3. Thus, theprocess illustrated in FIG. 3 can be visualized by the flow diagramillustrated in FIG. 4A. The data collected by the mobile device, forexample accelerometer data, gyroscope data, and the like, is collectedin the reference frame of the mobile device as illustrated in FIG. 2.The right/left sides with the screen facing the user is the x-axisdirection, the top/bottom is the y-axis direction, and the front/back isthe z-axis direction. As described herein, this data referenced to themobile device reference frame is converted to data referenced to thevehicle's reference frame. Thus, given data in the reference frame ofthe mobile device, a transformation is provided that enables the data inthe reference frame of the mobile device to be transformed into data inthe reference frame of the vehicle. As described herein, by aligning twoaxes of the mobile device with gravity and with the direction of motionof the vehicle, respectively, given any orientation of the mobiledevice, the mobile device data can be transformed into the vehicle'sreference frame. Utilizing embodiments of the present invention,standardization is possible since irrespective of the mobile device'sactual position and orientation, the data stream is referenced to thevehicle's reference frame.

In the embodiments described herein, the convention is used that thetop-to-bottom axis of the mobile device is oriented along the directionof gravity and the front-to-back axis of the mobile device is orientedalong the direction of motion of the vehicle, but the present inventionis not limited to this convention. Other conventions can be utilized aswill be evident to one of skill in the art. One of ordinary skill in theart would recognize many variations, modifications, and alternatives.

First, gravity is considered and the gravity vector (415) is used todefine a Global gravity reference frame (420). As illustrated in FIG.4B, which illustrates an axis of a global gravity reference frame, thenegative y-axis of the mobile device is aligned with respect to thegravity vector.

In this application, discussion is provided in relation to “aligning”the negative y-axis of the phone with gravity. It should be appreciatedthat this discussion can also be provided in relation to computing aquaternion that enables data that is received in the mobile device'sreference frame to be transformed into a new reference frame that, i.e.,the reference frame of the vehicle. Thus, aligning of the axes of themobile device to the axes of the vehicle and transforming data from themobile device reference frame to the vehicle reference frame can beconsidered as different aspects of the same process.

Thus, in this disclosure, methods are described in which one or moreaxes of the mobile device reference frame are “aligned” withcorresponding axes of other reference frames. It should be understoodthat discussion of this alignment includes a unitary, lineartransformation of data measured in the mobile device's reference frameinto the other reference frames. Thus, discussion of aligning axes fromone reference frame to axes or directions in other reference framesshould be understood to include computing quaternions that enable datameasured in a first reference frame to be transformed, for example, byusing a unitary, linear transformation, into a second reference frame,which can be the reference frame of the vehicle. Given data in thereference frame of the mobile device, it is equivalent to discussrotating the axes of the mobile device to align with the reference frameof the vehicle, in which case the data measured in the mobile device'sreference frame is useful in the reference frame of the vehicle, or todiscuss computing the matrix, such as a quaternion, that transform thedata from the mobile device's reference frame to the reference frame ofthe vehicle.

Next, the global gravity reference frame is converted to a global (i.e.,earth-based) gravity/magnetic reference frame (430) by aligning thenegative z-axis with a magnet direction such as magnetic north. Thisprocess can also be discussed in terms of computing a transformationthat aligns the negative z-axis with a magnetic direction such asmagnetic north. Thus, the gravity and magnetometer data can link themobile device reference frame to the global (i.e., earth's) referenceframe because gravity points to the center of the earth and the magneticfield points north and south.

As illustrated in FIG. 4C, which illustrates axes of a globalgravity/magnetic reference frame, the negative y-axis is aligned alonggravity and the negative z-axis is aligned with magnetic north althoughother magnetic directions could be utilized as appropriate. The datafrom the magnetometer (425) in the mobile device is utilized in thisalignment process. Given the transformation from the mobile device'sreference frame to the global gravity/magnetic reference frame,magnetometer values measured in the mobile device reference frame can betransformed to the new reference frame. It could be imagined that if themobile device was rotated to align along gravity and magnetic north, themagnetometer values measured in the mobile device reference frame wouldbe equal to magnetometer values measured in the global gravity/magneticreference frame.

The GPS course (435) is determined and this information is utilized toalign the global gravity/magnetic reference frame to the vehiclereference frame (440). As illustrated in FIG. 4D, which illustrates axesof a vehicle reference frame, the negative y-axis is aligned alonggravity and the negative z-axis is aligned with the direction of travelof the vehicle. In this process, the negative z-axis, which was alignedwith the magnetic direction (e.g., magnetic north) to provide the globalgravity/magnetic reference frame 430, is now aligned with the directionof travel of the vehicle. Given this vehicle reference frame, the datacollected in the mobile device reference frame can be transformed intothe vehicle reference frame. In some implementations, quaternionsassociated with transformations from the mobile device reference frameto the global gravity reference frame to the global gravity/magneticreference frame to the vehicle's reference frame are combined to providea final quaternion that encompasses all three transformations.

It should be noted that for some implementations, the assumption is madethat the gravity points down along the negative y-axis of the vehicle,which is appropriate for travel along level surfaces. As will be evidentto one of skill in the art, if the vehicle is travelling uphill ordownhill, there may be misalignment between the gravity vector and thenegative y-axis of the vehicle. Typically, this is a second order effectand can be compensated for by tracking the altitude of the vehicle, forexample, using GPS data, as the vehicle moves and compensating for thenon-level travel by use of the measured increase in altitude, asdescribed more fully below.

Referring to FIG. 3, the method includes determining an orientation of agravity vector (310). During a trip, data from the sensors in the mobiledevice is collected on a periodic, a non-periodic basis, or acombination thereof. As an example, sensors including an accelerometer,a gyroscope, a magnetometer, and the like can provide data that can becollected, stored, sorted, and the like for use by the systems describedherein. As an example, for each time step during a trip, the gravityvector in the phone's reference frame can be provided by a processor inthe mobile device. In other implementations, the gravity vector as afunction of time is determined by using Kalman filters as described inU.S. Patent Application Publication No. 2016/0325756, incorporated byreference above.

Given the gravity vector g in the reference frame of the mobile device,the method includes aligning a first axis of the mobile device withrespect to the gravity vector (312). In an embodiment, the first axis ofthe mobile device is the negative y-axis of the mobile device. In thisembodiment, a reference vector g_(ref) is defined as g_(ref)=(0, −1, 0),which corresponds to the negative y-axis of the mobile device, whichwill be aligned with gravity as described herein. The angle θ betweenthe reference vector and the gravity vector norm is determined as:

θ=cos⁻¹(−g _(ref) ·g _(norm)).

The rotation axis, i.e., the axis around which the mobile device isrotated to align the negative y-axis of the mobile device with thegravity vector, can then be determined as:

ν=(ν_(x),ν_(y),ν_(z))=g _(ref) ×g _(norm).

From ν and θ, a first quaternion q₁ is calculated as:

$q_{w} = {\cos\mspace{11mu}\left( \frac{\theta}{2} \right)}$$q_{x} = {v_{x}\sin\mspace{11mu}\left( \frac{\theta}{2} \right)}$$q_{y} = {v_{y}\sin\mspace{11mu}\left( \frac{\theta}{2} \right)}$$q_{z} = {v_{z}\sin\mspace{11mu}\left( \frac{\theta}{2} \right)}$q₁ = (q_(w), q_(x), q_(y), q_(z)),

where ν_(x)=−g_(z), ν_(y)=0, ν_(z)=g_(x) for gravity alignment.

In order to calculate a magnetometer vector m₁ in the gravity-alignedreference frame, the compliment of q₁, q′₁, is used to rotate themagnetometer vector in the mobile device reference frame to provide themagnetometer vector m₁ in the gravity-aligned reference frame as:

m ₁ =m⊗q′ ₁

Although the reference vector discussed above aligns the negative y-axisof the mobile device with the gravity vector, this is not required bythe present invention and other conventions can be utilized within thescope of the present invention. One of ordinary skill in the art wouldrecognize many variations, modifications, and alternatives.

The method also includes determining the orientation of a magneticdirection (314). In some embodiments, the magnetic direction is MagneticNorth. In this embodiment, the negative z-axis of the mobile device inthe gravity-aligned reference frame, is aligned with Magnetic North. Areference vector m_(1ref)=(0, 0, −1) is defined as appropriate to thealignment of the negative z-axis with Magnetic North. The norm of thegravity-aligned magnetometer vector m₁ can be computed asm_(1norm)=m₁/|m₁|.

A magnetic rotation angle θ₂ is calculated as θ₂=cos⁻¹(m_(1ref)·m_(1norm)) and a second rotation axis around which the mobiledevice is rotated to align the negative z-axis with the magneticdirection (e.g., magnetic north) ν₂ =(ν_(2,x), ν_(2,y),ν_(2,z))=m_(1ref)×m_(1norm) is computed. As discussed above in relationto the alignment of the mobile device's first axis (e.g., negativey-axis) with the gravity vector, a second quaternion (q₂) related to thealignment of the second axis with a magnetic direction can be calculatedusing the second rotation axis and the magnetic rotation angle (θ₂) as:

$q_{2,w} = {\cos\mspace{11mu}\left( \frac{\theta_{2}}{2} \right)}$$q_{2,x} = {v_{2,x}\sin\mspace{11mu}\left( \frac{\theta_{2}}{2} \right)}$$q_{2,y} = {v_{2,y}\sin\mspace{11mu}\left( \frac{\theta_{2}}{2} \right)}$$q_{2,z} = {v_{2,z}\sin\mspace{11mu}\left( \frac{\theta_{2}}{2} \right)}$q₂ = (q_(2, w), q_(2, x), q_(2, y), q_(2, z)).

Given the second quaternion and the complement of the second quaternion(q′₂), the method includes aligning a second axis of the mobile devicewith respect to the magnetic direction (316). Accordingly, themagnetometer vector in the gravity-aligned reference frame (m₁) isrotated using a quaternion multiplication to compute the magnetometervector in the gravity-aligned and magnetic direction-aligned (e.g.,magnetic north-aligned) reference frame (m₂) as:

m ₂ =m ₁ ⊗q′ ₂.

The travel direction of the vehicle is computed (318) using the GPScourse provided by the GPS unit. θ₃=−(gps course) and a third rotationaxis ν₃ is defined as ν₃ =(ν_(3,x), ν_(3,y), ν_(3,z))=(0, 1, 0). Thethird quaternion q₃, which relates the travel direction of the vehicleto the gravity aligned magnetic direction (e.g., north) is computed as:

$q_{3,w} = {\cos\mspace{11mu}\left( \frac{\theta_{3}}{2} \right)}$$q_{3,x} = {v_{3,x}\sin\mspace{11mu}\left( \frac{\theta_{3}}{2} \right)}$$q_{3,y} = {v_{3,y}\sin\mspace{11mu}\left( \frac{\theta_{3}}{2} \right)}$$q_{3,z} = {v_{3,z}\sin\mspace{11mu}\left( \frac{\theta_{3}}{2} \right)}$q₃ = (q_(3, w), q_(3, x), q_(3, y), q_(3, z)).

Given the first, second, and third quaternions, the method orients themobile device to the vehicle by computing the final quaternion (q),which describes the orientation of the mobile device with respect to thereference frame of the vehicle:

∘q=q ₁ ⊗q ₂ ⊗q ₃.

This final quaternion combines the transformations from the mobiledevice reference frame to the global gravity reference frame to theglobal gravity/magnetic reference frame to the vehicle's reference framesuch that the final quaternion encompasses all three transformations. Itshould be noted that the order of the order of the transformations canbe modified given suitable changes to the quaternions/compliments. Oneof ordinary skill in the art would recognize many variations,modifications, and alternatives.

On non-level roads, the above steps could lead to a misalignment withthe gravity axis. To correct for this effect, we first calculate theinclination angle (θ₄) of the road using the change in altitude anddistance traveled, which are both provided by the GPS unit. A fourthrotation axis ν₄ is defined as ν₄ =(ν_(4,x), ν_(4,y), ν_(4,z))=(1, 0,0). The quaternion q₄, which relates the inclination angle of the roadand the gravity and magnetic direction reference frame is computed as:

$q_{4,w} = {\cos\mspace{11mu}\left( \frac{\theta_{4}}{2} \right)}$$q_{4,x} = {v_{4,x}\sin\mspace{11mu}\left( \frac{\theta_{4}}{2} \right)}$$q_{4,y} = {v_{4,y}\sin\mspace{11mu}\left( \frac{\theta_{4}}{2} \right)}$$q_{4,z} = {v_{4,z}\sin\mspace{11mu}\left( \frac{\theta_{4}}{2} \right)}$q₄ = (q_(4, w), q_(4, x), q_(4, y), q_(4, z)).

The final quaternion q_(final) after compensation for non-level roads iscalculated as,

∘q _(final) =q⊗q ₄.

It should be appreciated that the specific steps illustrated in FIG. 3provide a particular method of orienting a mobile device in thereference frame of a vehicle according to an embodiment of the presentinvention. Other sequences of steps may also be performed according toalternative embodiments. For example, alternative embodiments of thepresent invention may perform the steps outlined above in a differentorder. Moreover, the individual steps illustrated in FIG. 3 may includemultiple sub-steps that may be performed in various sequences asappropriate to the individual step. Furthermore, additional steps may beadded or removed depending on the particular applications. One ofordinary skill in the art would recognize many variations,modifications, and alternatives.

Utilizing embodiments of the present invention, motion of the mobiledevice referenced to the vehicle enables categorization of mobile devicemotions. As an example, a user picking up the phone from the seat andplacing the phone by their ear can be distinguished from the userputting the phone back down after a call.

The methods described herein were tested by conducting the followingexperiment. A mobile device (i.e., a mobile phone) was placed in a phonemount in a moving car with the negative y-axis of the phone aligned withgravity. The quaternions suitable for aligning the phone to the vehiclereference frame were computed during a driving event and are shown inFIG. 7.

Since the phone's reference frame is already aligned with the vehicle'sreference frame, the quaternions q=(q_(w), q_(x), q_(y), q_(z)) shouldbe close to (1, 0, 0, 0). Referring to FIG. 7, the measurements andcomputed quaternions demonstrate that for most of the driving event, thecomputed values are close to the expected value. Thus, the dataillustrated in FIG. 7 demonstrates the accuracy and utility of thesystems and methods described herein.

FIG. 5 is a simplified flowchart illustrating a method of transformingmobile device data into vehicle-based data according to an embodiment ofthe present invention. The method includes initiating a driving event(510), receiving mobile device data associated with a time stamp (512),and computing a quaternion to transform the mobile device data to avehicle reference frame (514). The method also includes determining ifthe driving event is complete (516). If the driving event is notcomplete, then the method iterates by incrementing the time stamp (520)and receiving additional mobile device data associated with theincremented time stamp (512). In some embodiments, the iteration cycletime is 1 second, whereas in other embodiments, the iteration cycle timeranges from about 100 ms to about 10 seconds.

Using the mobile device data at the delayed time stamp, a new quaternionis computed (514). Accordingly, a vector can be created over time asquaternions associated with each time step are computed. This vectorparameterized by time can be utilized to convert a string of mobiledevice data in the reference frame of the mobile device into a string ofdata referenced to the vehicle reference frame. If the driving event iscomplete, then the final quaternion is utilized to transform the mobiledevice data in the reference frame of the mobile device into thereference frame of the vehicle (518).

Referring to FIG. 3, the process illustrated in FIG. 3 can thus beperformed as a function of time during a driving event as discussed inrelation to FIG. 5 to provide a time-based quaternion vector thatrelates the mobile device data measured in the mobile device referenceframe to data presented in the vehicle reference frame.

It should be noted that if the mobile device is fixed in the vehicleduring the entire driving event, the final quaternion will be constantsince the mobile device's reference frame and the vehicle's referenceframes are fixed with respect to each other, resulting in a singlerelationship between the reference frames of the mobile device and thevehicle during the driving event. This constant final quaternion willrepresent a single transformation associated with the driving event.

Although the method illustrated in FIG. 5 performs processing of themobile device data during the drive, for example, computing thequaternion that is used to transform the mobile device data to thevehicle reference frame, this is not required by the present invention.In other implementations, the data collected during the driving event ispost-processed after the driving event is completed.

It should be appreciated that the specific steps illustrated in FIG. 5provide a particular method of transforming mobile device data intovehicle-based data according to an embodiment of the present invention.Other sequences of steps may also be performed according to alternativeembodiments. For example, alternative embodiments of the presentinvention may perform the steps outlined above in a different order.Moreover, the individual steps illustrated in FIG. 5 may includemultiple sub-steps that may be performed in various sequences asappropriate to the individual step. Furthermore, additional steps may beadded or removed depending on the particular applications. One ofordinary skill in the art would recognize many variations,modifications, and alternatives.

FIG. 6 is a simplified flowchart illustrating a method of identifyinguse of a mobile device by a driver during a driving event according toan embodiment of the present invention. The method includes obtainingmotion data from the mobile device during a driving event (610). Themobile device has a front screen. In some embodiments, the motion dataincludes accelerometer data and/or magnetometer data. The method alsoincludes orienting the motion data to a reference frame of the vehicle(612). The motion data is oriented to the reference frame of the vehicleby aligning a first axis of the mobile device with a gravity vector,aligning a second axis of the mobile device with a magnetic vector,determining a direction of travel for the vehicle, and aligning thesecond axis to the direction of travel. The determination of thedirection of travel for the vehicle can include obtaining courseinformation for the vehicle and aligning a negative z-axis of thevehicle reference frame to the course information.

In an embodiment, the first axis is the negative y-axis. In thisembodiment, aligning the negative y-axis of the mobile device with thegravity vector comprises computing a quaternion operable to transformmotion data from the mobile device from the negative y-axis to thegravity vector. In another embodiment, the second axis is the negativez-axis. In this embodiment, the magnetic vector is magnetic north.

The method further includes determining, using the oriented motion data,that the mobile device has moved left with respect to the vehicle (614)and determining, using the oriented motion data, that the front screenof the mobile device is facing left with respect to the vehicle (616).Since the mobile device has moved left inside the vehicle and the frontscreen is facing the driver (i.e., the left hand side of the vehicle),it is possible to identify the use of the mobile device by the driverduring the driving event (618). As an example, if the mobile device is asmartphone and the driver picks up the smartphone from the centerconsole or the passenger's seat and places the phone against their rightear, it would be determined that the mobile device has moved left insidethe vehicle and that the front screen is facing the driver. The methodof identifying the driver's use of the mobile device can be supplementedor combined with other methods of determining the identity of a driver.

It should be appreciated that the specific steps illustrated in FIG. 6provide a particular method of identifying use of a mobile device by adriver during a driving event according to an embodiment of the presentinvention. Other sequences of steps may also be performed according toalternative embodiments. For example, alternative embodiments of thepresent invention may perform the steps outlined above in a differentorder. Moreover, the individual steps illustrated in FIG. 6 may includemultiple sub-steps that may be performed in various sequences asappropriate to the individual step. Furthermore, additional steps may beadded or removed depending on the particular applications. One ofordinary skill in the art would recognize many variations,modifications, and alternatives.

FIG. 8 is a simplified flowchart illustrating a method of identifying adriver of a vehicle having a vehicle reference frame according to anembodiment of the present invention. The method (800) includes obtainingmobile device motion data in a mobile device reference frame during adriving event (810) and determining that the vehicle has stopped atcompletion of the driving event (812). The method also includesobtaining additional mobile device motion data after completion of thedriving event (814) and aligning the mobile device motion data and theadditional mobile device motion data to the vehicle reference frame(816).

The method further includes determining that a trajectory of theadditional mobile device motion data correlates with a direction alignedwith a driver side of the vehicle reference frame (818) and identifyingthe driver of the vehicle based on the trajectory (820). As an example,after the completion of the driving event, the driver will exit the caron the left side of the vehicle. This contrasts with a passenger havingthe mobile device, who will exit from the right of the vehicle. Inperforming the method illustrated in FIG. 8, the methods and systemsutilized herein to align the reference frame of the mobile device to thereference frame of the vehicle can be utilized. Alignment of thereference frames of the mobile device and the vehicle during the drivingevent can be performed during the driving event, after the drivingevent, or using combinations of these approaches. One of ordinary skillin the art would recognize many variations, modifications, andalternatives.

It should be appreciated that the specific steps illustrated in FIG. 8provide a particular method of identifying a driver of a vehicle havinga vehicle reference frame according to an embodiment of the presentinvention. Other sequences of steps may also be performed according toalternative embodiments. For example, alternative embodiments of thepresent invention may perform the steps outlined above in a differentorder. Moreover, the individual steps illustrated in FIG. 8 may includemultiple sub-steps that may be performed in various sequences asappropriate to the individual step. Furthermore, additional steps may beadded or removed depending on the particular applications. One ofordinary skill in the art would recognize many variations,modifications, and alternatives.

FIG. 9 is a simplified flowchart illustrating a method of performingexit detection according to an embodiment of the present invention. Exitdetection can include detecting that the driver has exited the vehicleor that a passenger has exited the vehicle. As described herein, thesemethods include determining if the phone is moving from the center ofthe vehicle to the left, which is associated with driver exit, or fromthe center of the vehicle to the right, which is associated withpassenger exit. The method (900) includes receiving motion data from themobile device, measured in the mobile device reference frame (910). Themethod also includes transforming the motion data to the vehiclereference frame (912) and determining that the mobile device isstationary with respect to the vehicle reference frame during a firsttime period (914).

The method further includes determining that the mobile device is movedwith respect to the vehicle reference frame during a second time period(916). If the movement during the second time period was directed to theleft (918—Yes), which indicates that the driver has moved the mobiledevice, then a determination is made that the driver of the vehicle hasexited the vehicle (920). If the movement during the second time periodwas directed to the right (918—No), which indicates that the passengerhas moved the mobile device, then a determination is made that thepassenger of the vehicle has exited the vehicle (922). In performing themethod illustrated in FIG. 9, the methods and systems utilized herein toalign the reference frame of the mobile device to the reference frame ofthe vehicle can be utilized. Alignment of the reference frames of themobile device and the vehicle can be performed during the driving event,after the driving event, or using combinations of these approaches. Oneof ordinary skill in the art would recognize many variations,modifications, and alternatives.

It should be appreciated that the specific steps illustrated in FIG. 9provide a particular method of performing exit detection according to anembodiment of the present invention. Other sequences of steps may alsobe performed according to alternative embodiments. For example,alternative embodiments of the present invention may perform the stepsoutlined above in a different order. Moreover, the individual stepsillustrated in FIG. 9 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. One of ordinary skill in the art wouldrecognize many variations, modifications, and alternatives.

It is also understood that the examples and embodiments described hereinare for illustrative purposes only and that various modifications orchanges in light thereof will be suggested to persons skilled in the artand are to be included within the spirit and purview of this applicationand scope of the appended claims.

What is claimed is:
 1. A method of providing a quaternion for referenceframe transformation, the method comprising: (a) initiating a drivingevent in a vehicle having a vehicle reference frame; (b) receiving, froma mobile device, mobile device data associated with a time stamp; (c)computing a quaternion operable to transform the mobile device data tothe vehicle reference frame; (d) determining if the driving event iscomplete; incrementing the time stamp and iterating steps (a), (b), (c),and (d) if the driving event is not complete; and providing thequaternion for reference frame transformation if the driving event iscomplete.
 2. The method of claim 1 wherein the mobile device data isreceived in a reference frame of the mobile device.
 3. The method ofclaim 2 wherein iterating steps (a), (b), (c), and (d) produces a vectorincluding a plurality of quaternions as a function of time.
 4. Themethod of claim 3 further comprising using the vector to convert astring of mobile device data in the reference frame of the mobile deviceinto a string of data referenced to the vehicle reference frame.
 5. Themethod of claim 2 further comprising utilizing the quaternion totransform the mobile device data in the reference frame of the mobiledevice into the vehicle reference frame.
 6. A method of identifying useof a mobile device by a driver of a vehicle during a driving event, themethod comprising: obtaining motion data from the mobile device duringthe driving event; orienting the obtained motion data to a referenceframe of the vehicle; determining that the mobile device has moved tothe left with respect to the vehicle; determining that a front screen ofthe mobile device faces to the left with respect to the vehicle; andidentifying use of the mobile device by the driver during the drivingevent.
 7. The method of claim 6 wherein determining that the frontscreen of the mobile device faces to the left with respect to thevehicle is performed after determining that the mobile device has movedto the left with respect to the vehicle.
 8. The method of claim 6wherein the motion data from the mobile device is obtained in areference frame of the mobile device.
 9. The method of claim 6 whereinorienting the obtained motion data to a reference frame of the vehiclecomprises computing a quaternion operable to transform the obtainedmotion data to the reference frame of the vehicle.
 10. The method ofclaim 6 wherein the motion data includes accelerometer data.
 11. Themethod of claim 6 wherein the motion data includes magnetometer data.12. The method of claim 6 wherein the motion data is oriented to thereference frame of the vehicle by aligning a first axis of the mobiledevice with a gravity vector, aligning a second axis of the mobiledevice with a magnetic vector, determining a direction of travel for thevehicle, and aligning the second axis to the direction of travel.